#include<windows.h>
#include<iostream>

using namespace std;


int main(){
		
		MEMORYSTATUSEX memStatus;
		memStatus.dwLength = sizeof(MEMORYSTATUSEX);
		
		if(GlobalMemoryStatusEx(&memStatus)){
			cout << "total memory: " << memStatus.ullTotalPhys << endl;
			cout << "available memory: " << memStatus.ullAvailPhys << endl;
		}else{
			cerr << "fail" << endl;
		}
		
		
		return 0;
		
}
